/**
 * 
 */
package soa.security.domain;

import javax.naming.Name;

import org.springframework.ldap.odm.annotations.Attribute;
import org.springframework.ldap.odm.annotations.DnAttribute;
import org.springframework.ldap.odm.annotations.Entry;
import org.springframework.ldap.odm.annotations.Id;
import org.springframework.ldap.support.LdapNameBuilder;

import soa.security.Constants;

/**
 * @author Cre.Gu
 *
 */
@Deprecated
@Entry(objectClasses = { "zjtzsw-systemrole", "zjtzsw-bid" })
public class SystemRole extends SoaBid {

	private static final long serialVersionUID = 3505413781631479936L;

	@Id
	private Name dn;

	@DnAttribute(value = "bid")
	private String bid;

	@Attribute(name = "cname")
	private String name;

	@Attribute(name = "ccode")
	private String code;

	private String ename;

	private String description;

	public SystemRole() {
	}

	public Name buildDn(Name baseDn) {
		return LdapNameBuilder.newInstance(baseDn).add(Constants.BID, getBid())
				.build();
	}

	public Name getDn() {
		return dn;
	}

	public void setDn(Name dn) {
		this.dn = dn;
	}

	public String getBid() {
		return bid;
	}

	public void setBid(String bid) {
		this.bid = bid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getEname() {
		return ename;
	}

	public void setEname(String ename) {
		this.ename = ename;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
